#include <stdio.h>

int main()
{
    int n = 0, min = 1000;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
    {
        int t = 0;
        scanf("%d", &t);

        if (t < min)
            min = t;
    }
    printf("%d", min);
    return 0;
}
